The present disclosure relates to computer programming, and more specifically to detection of uninitialized variables.
In computer programming, an uninitialized variable is a variable that is declared but is not set to a definite value. During program execution, an uninitialized variable will generally have an unpredictable value. As such, a use of a variable before its initialization is a programming error and a common source of bugs in software, and will sometimes cause more severe results than software crash.
A compiler is a computer program that translates source code from a high level programming language to a lower level language such as assembly language or machine code. Some compilers provide functionality of detecting uninitialized variables and reporting them as compile-time errors. These compilers usually perform static data flow analysis on program source code at a compile time